<?php
$code=$_GET['code'];

$sql="select shop.name,shop.img,orders.price,orders.num from orders,shop where orders.shop_id=shop.id and orders.code={$code}";
$rst=$mysqli->query($sql);
?>

<table border="1" cellspacing="0" width="100%">
	<tr>
		<th>商品名称</th>
		<th>图片</th>
		<th>价格</th>
		<th>数量</th>
	</tr>
	<?php
		while($row=$rst->fetch_assoc()){
			echo "<tr>";
			echo "<td>{$row['name']}</td>";
			echo "<td><img height='100' src='{$row['img']}'/></td>";
			echo "<td>{$row['price']}</td>";
			echo "<td>{$row['num']}</td>";
			echo "</tr>";
		}

	?>
</table>
